<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
    <link rel="stylesheet" href="{TG_URL_ARES}weiui/weui.min.css">
    <link rel="stylesheet" href="{TG_URL_ARES}weiui/jquery-weui.min.css">
    <link rel="stylesheet" href="{TG_URL_ARES}shaoniangong/css/aliicon/font.css"/>
    <link rel="stylesheet" href="{TG_URL_ARES}shaoniangong/css/swiper.min.css"/>
    <link rel="stylesheet" href="{TG_URL_ARES}shaoniangong/css/common.css"/>
    <link rel="stylesheet" href="{TG_URL_ARES}shaoniangong/css/detailkq.css"/> 
    <script src="{TG_URL_ARES}shaoniangong/weiui/jquery-2.1.4.js"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
    <script src="{TG_URL_ARES}shaoniangong/js/cartFly.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-weui/1.0.1/js/jquery-weui.min.js"></script>
    <script src="{TG_URL_ARES}shaoniangong/js/swiper.min.js"></script>
    <script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/city-picker.min.js"></script>
    <script src="{TG_URL_ARES}shaoniangong/js/common.js"></script>
    <title>{$pagetitle}</title>
    {php echo register_jssdk();}
    <script>
        wx.ready(function () {
            var shareData = {
                title: "{$config['share']['share_title']}"||document.title,
                desc:"{$config['share']['share_desc']}" ,
                link: "{$tourl}",
                imgUrl: "{php echo tomedia($config['share']['share_image'])}"
            };
            //分享朋友
            wx.onMenuShareAppMessage({
                title: shareData.title,
                desc: shareData.desc,
                link: shareData.link,
                imgUrl: shareData.imgUrl,
                trigger: function (res) {
                    //alert(shareData.desc);
                },
                success: function (res) {
                    //alert(shareData.desc);
                },
                cancel: function (res) {
                    //alert(shareData.desc);
                },
                fail: function (res) {
                    //alert(JSON.stringify(res));
                }
            });
            //朋友圈
            wx.onMenuShareTimeline({
                title: shareData.title,
                link: shareData.link,
                imgUrl: shareData.imgUrl,
                trigger: function (res) {
                },
                success: function (res) {
                },
                cancel: function (res) {
                },
                fail: function (res) {
                    alert(JSON.stringify(res));
                }
            });
            //获取地理位置
//            wx.getLocation({
//                type: 'gcj02', //返回可以用于wx.openLocation的经纬度
//                success: function (res) {
//                    var location={
//                        latitude:res.latitude,
//                        longitude:res.longitude
//                    };
//                    sessionStorage.setItem('location',JSON.stringify(location));
//                }
//            });
        });


        var commonURL="{$_W['siteroot']}"+"minapi.php?uniacid={$_W['uniacid']}&";
        var commonURLYY="{$_W['siteroot']}"+"makeapi.php?uniacid={$_W['uniacid']}&";
        var indexUrl="{php echo app_url('goods/list')}";//首页url
        var detailurl="{php echo app_url('goods/detail');}";//详情页URL
        var detailkqurl="{php echo app_url('goods/detailkq');}";//详情页2URL
        var searchUrl = "{php echo app_url('goods/list/search')}";//搜索Url
        var urlorder="{php echo app_url('order/shoporderconfirm')}";//预约提交页url
        var personnelUrl="{php echo app_url('order/personnelList')}";//技师列表页url
        var personnelDetailUrl="{php echo app_url('order/personnelListDetail')}";//技师详情url
        var orderUrl="{php echo app_url('order/order')}";//预约列表
        var paySucc="{php echo app_url('pay/success')}?uniacid={$_W['uniacid']}&";//支付成功
        var detailkq="{php echo app_url('goods/detailkq')}";
        var hexiaoList = "{php echo app_url('member/child')}?uniacid={$_W['uniacid']}&openid={$_W['openid']}&";  //核销列表

        var ajaxCar=commonURL+"op=collect_list&openid={$_W['openid']}"; //加载购物车
        var addCar=commonURL+"op=collect_add&openid={$_W['openid']}";//购物车加
        var minusCar=commonURL+"op=collect_remove&openid={$_W['openid']}";//购物车减
        var clearCartList =commonURL+"op=collect_clear&openid={$_W['openid']}";//清空购物车
        var ajaxAddress =commonURL+"op=addresslist&openid={$_W['openid']}";//加载收货地址
        var addressmoren =commonURL+"op=address&openid={$_W['openid']}";//加载默认收货地址
        var addressEdit =commonURL+"op=address_edit&openid={$_W['openid']}";//保存收货地址
        var addressDel =commonURL+"op=address_del&openid={$_W['openid']}";//删除收货地址
        var salerlist =commonURL+"op=saler_list&openid={$_W['openid']}";//技师列表——筛选 form order
        var saleralllist =commonURL+"op=saler_alllist&openid={$_W['openid']}";//技师列表——筛选  lists
        var myjishi =commonURL+"op=my_order_jishi&openid={$_W['openid']}";//技师列表——筛选  form user
        var salerDetail =commonURL+"op=jishi_detail&openid={$_W['openid']}";//技师详情页
        var checkOrder =commonURL+"op=check_neworderSNG&openid={$_W['openid']}";//下单
        var order_jishi_time =commonURL+"op=order_jishi_time&openid={$_W['openid']}";//技师时间筛选
        // var before_pay_checksng=commonURL+"op=before_pay_checksng&openid={$_W['openid']}";//支付前校验
        var before_pay_checksng=commonURL+"op=before_pay_checksng&openid={$_W['openid']}";//支付前校验
        var check_payresult=commonURL+"op=check_payresult&openid={$_W['openid']}";//免费通道
        var member_shaoniangong_add=commonURL+"op=member_shaoniangong_add&openid={$_W['openid']}&uniacid={$_W['uniacid']}";//少年宫 会员表单接口
        var member_shaoniangong_view=commonURL+"op=member_shaoniangong_view&openid={$_W['openid']}&uniacid={$_W['uniacid']}";//新用户确认
        var member_coupon_view=commonURL+"op=member_coupon_view&openid={$_W['openid']}&uniacid={$_W['uniacid']}";//卡券
        var member_coupon_viewYY=commonURLYY+"op=member_coupon_view&openid={$_W['openid']}&uniacid={$_W['uniacid']}";//卡券
        var member_favorabler_add=commonURL+"op=member_favorabler_add&openid={$_W['openid']}&uniacid={$_W['uniacid']}";//领取卡券
        var member_blacklist_view=commonURL+"op=member_blacklist_view&openid={$_W['openid']}&uniacid={$_W['uniacid']}";//黑名单
        var order_cancel=commonURL+"op=order_cancel&openid={$_W['openid']}&uniacid={$_W['uniacid']}";//免费的订单取消
        var member_blacklist_add=commonURL+"op=member_blacklist_add&openid={$_W['openid']}&uniacid={$_W['uniacid']}";//自动加入黑名单
        var getgradelist = commonURL+"op=getgradelist&openid={$_W['openid']}&uniacid={$_W['uniacid']}"; //获取项目年级范围
        // var member_shaoniangong_view=commonURL+"op=member_shaoniangong_view&openid={$_W['openid']}&uniacid={$_W['uniacid']}";//个人信息接入
        var paycash="{php echo app_url('pay/cash')}";//支付
        var ajaxTimecount=commonURL+"op=time_count_num&openid={$_W['openid']}";    
        var date_push = commonURL+"op=date_push";  //预约时间段      
        var select = commonURL+"op=select";//技师列表——筛选  form user
        var uniacid = "{$_W['uniacid']}";  
        //判断是否是新用户
        $.get(member_shaoniangong_view,function (res) {
            var data = JSON.parse(res);
            if(!data.user.idcard) {
                $('.noIdMessage').css({
                    'display':'block'
                })
            }
        })
    </script>
